from Base import message, intersect, SS_VALID
from DRG import MDCG_DRG

def group(record):
  adrg_zd = []
  adrg_zd1 = []
  adrg_ss = ["45.3401","45.3402","45.4201","45.4301","45.4302","45.4303","45.4304","45.4305","45.4306","45.4307","46.8504","46.8511","46.9501","46.9601","46.9602","48.3301","48.3602","48.3603","49.3101","98.0303","98.0401","45.3400x001","45.3400x005","45.4200x003","45.4300x008","46.3200x002","46.8600","46.8600x001","46.9600x001","47.9900x002","48.3200x001","48.3600x002","48.9900x005","97.5201","97.5900x001","97.5900x002","97.5900x003","98.0500x003"]
  adrg_ss1 = []
  dept_list = []

  if True and record.ssList and record.ssList[0] in adrg_ss:
    message('符合GK3入组条件，匹配规则：主手术匹配')

    if MDCG_DRG.GK33_group(record):
      return 'GK33'

    if MDCG_DRG.GK35_group(record):
      return 'GK35'
        
    return 'GK3'
  else:
    return ''
    
